

    <div class="content">
        
        <div class="header">
            
            <h1 class="page-title">分类管理</h1>
        </div>
        
             <!--    <ul class="breadcrumb">
            <li><a href="index.html">Home</a> <span class="divider">/</span></li>
            <li class="active">Users</li>
        </ul> -->

        <div class="container-fluid">
            <div class="row-fluid">
                    
<div class="btn-toolbar">
    <a href="javascript:;" onclick="append('新增分类','append','800','400')"><button class="btn btn-primary"><i class="icon-plus"></i>新增分类</button></a>
    
  <div class="btn-group">
  </div>
</div>
<div class="well">
    <table class="table">
      <thead>
        <tr>
          <th style="text-align: left">分类名称</th>
          <th>分类ID</th>
          <th>管理</th>
          <th style="width: 26px;"></th>
        </tr>
      </thead>
      <tbody>
        
        <volist name='cate' id='vo'>
        <tr>
          <td style="text-align: left">{$vo.catename}</td>
          <td>{$vo.cate_id}</td>
          <td>
              <a href="javascript:;" onclick="edit('分类修改','edit.html?id={$vo.cate_id}','{$vo.cate_id}','800','400')"><button class="btn btn-primary"><i class="icon-pencil"></i></button></a>
              <a href="javascript:;"  onclick="del_cate('del?id={$vo.cate_id}')" role="button" data-toggle="modal"><button class="btn btn-primary"><i class="icon-remove"></i></button></a>
          </td>
        </tr>
        
          <!-- <if condition="!empty($vo.data)">
            <volist name='vo.data' id='vo2'>
              <tr>
                <td></td>
                <td>{$vo2.catename}</td>
                <td>{$vo2.cate_id}</td>
                <td>
                    <a href="javascript:;" onclick="edit('分类修改','edit.html?id={$vo2.id}','{$vo2.id}','800','400')"><i class="icon-pencil"></i></a>
                    <a href="javascript:;"  onclick="del_mana('del?id={$vo2.id}')" role="button" data-toggle="modal"><i class="icon-remove"></i></a>
                </td>
              </tr>
            </volist>
          </if> -->
        </volist>
        
      
      </tbody>
    </table>
</div>
<!-- <div class="pagination">
    
</div> -->

<script type="text/javascript">
   function append(title,url,w,h){
      layer_show(title,url,w,h);
   }
   function edit(title,url,id,w,h){
      layer_show(title,url,w,h);
   }

   function del_cate(url){

      layer.confirm('确定要删除吗',function(index){
        $.ajax({
          type:'POST',
          url: url ,
          dataType:'json',
          success: function(data){
            if(data.code==1){
              layer.msg(data.info,{icon:1,time:1000},function(){

                 location.href = "{:U('showlist')}";
                 
              });
             
            }else{
              layer.msg(data.info,{icon:2,time:1000});
              return false;
            }
            
          },
          error:function(data){
            
          }

        })
      });
   }
</script>

                